{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Datashader is a graphics pipeline system for creating meaningful\n",
    "representations of large datasets quickly and flexibly. Datashader\n",
    "breaks the creation of images into a series of explicit steps that\n",
    "allow computations to be done on intermediate representations.  This\n",
    "approach allows accurate and effective visualizations to be produced\n",
    "automatically without trial-and-error parameter tuning, and also makes\n",
    "it simple for data scientists to focus on particular data and\n",
    "relationships of interest in a principled way.\n",
    "\n",
    "The computation-intensive steps in this process are written in Python\n",
    "but transparently compiled to machine code using [Numba](https://numba.pydata.org) and flexibly\n",
    "distributed across CPU cores and processors using [Dask](https://dask.pydata.org) or GPUs using [CUDA](https://github.com/rapidsai/cudf), providing a\n",
    "highly optimized rendering pipeline that makes it practical to work\n",
    "with extremely large datasets even on standard hardware while exploiting distributed and GPU systems when available.\n",
    "\n",
    "For concreteness, here's an example of what Datashader code looks like:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "import datashader as ds, pandas as pd\n",
    "import datashader.transfer_functions as tf\n",
    "df = pd.read_csv('user_data.csv')\n",
    "\n",
    "cvs = ds.Canvas(plot_width=400, plot_height=400)\n",
    "agg = cvs.points(df, 'x_col', 'y_col', ds.mean('z_col'))\n",
    "img = tf.shade(agg, cmap=['lightblue', 'darkblue'], how='log')\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This code reads a data file into a Pandas dataframe `df`, and then\n",
    "projects the fields `x_col` and `y_col` onto the x and y dimensions of\n",
    "400x400 grid, aggregating it by the mean value of the `z_col` of each\n",
    "datapoint. The results are rendered into an image where the minimum\n",
    "count will be plotted in `lightblue`, the maximum in `darkblue`, and\n",
    "ranging logarithmically in between.\n",
    "\n",
    "With code like the above, you can plot 300 million points of data (one\n",
    "per person in the USA) from the 2010 census without any parameter tuning:\n",
    "\n",
    "<a href=\"https://examples.pyviz.org/census/census.html\"><img src=\"assets/images/usa_census.jpg\" alt=\"image\" width=\"1000\" /></a>\n",
    "\n",
    "<a href=\"https://examples.pyviz.org/census/census.html\"><img src=\"assets/images/nyc_races.jpg\" alt=\"image\" width=\"1000\" /></a>\n",
    "\n",
    "Or you can plot attractors with 10 million points each, using random colormaps:\n",
    "\n",
    "<a href=\"https://examples.pyviz.org/attractors/attractors.html\"><img src=\"assets/images/sym_attractors.jpg\" alt=\"image\" width=\"1000\" /></a>\n",
    "\n",
    "See the [topics page](topics) for these and many other examples.\n",
    "\n",
    "\n",
    "\n",
    "## Installation\n",
    "\n",
    "Please follow the instructions on [Getting Started](https://datashader.org/getting_started)\n",
    "if you want to reproduce the specific examples on this website, or follow the instructions at [HoloViz.org](https://holoviz.org) if you want to try out Datashader together with related plotting tools.\n",
    "\n",
    "\n",
    "\n",
    "## Other resources\n",
    "\n",
    "You can see Datashader in action in the [2019 HoloViz SciPy tutorial](https://www.youtube.com/watch?v=7deGS4IPAQ0) (3 hours!),\n", 
    "listen to the [Open Source Directions](https://www.youtube.com/watch?v=6m3CFbKmK_c) episode from July 2019, or\n",
    "see how it is used in many of the projects at [examples.pyviz.org](https://examples.pyviz.org).\n",
    "\n",
    "Some of the original ideas for Datashader were developed under the\n",
    "name Abstract Rendering, which is described in a [2014 SPIE VDA paper](http://spie.org/Publications/Proceedings/Paper/10.1117/12.2041200).\n",
    "\n",
    "The source code for datashader is maintained on [Github](https://github.com/holoviz/datashader), and\n",
    "is documented using the API link on this page.\n",
    "\n",
    "We recommend the [Getting Started Guide](getting_started) to learn\n",
    "the basic concepts and start using Datashader as quickly as possible.\n",
    "\n",
    "The [User Guide](user_guide) covers specific topics in more detail.\n",
    "\n",
    "The [API](api.html) is the definitive guide to each part of\n",
    "Datashader, but the same information is available more conveniently via\n",
    "the `help()` command as needed when using each component.\n",
    "\n",
    "Please feel free to report [issues](https://github.com/holoviz/datashader/issues) or [contribute code](https://help.github.com/articles/about-pull-requests). You are also welcome to chat with the developers on [gitter](https://gitter.im/pyviz/pyviz).\n"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
